from Page.Login import Login
from selenium.webdriver.common.by import By
class Add(Login):
    denglu_loc = (By.XPATH,'/html/body/div[1]/div/section/aside/ul/li/ul/li[4]/a')
    def denglu(self):
        self.click(self.denglu_loc)
    username_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[1]/div/input')

    def username(self):
        self.sendkeys(self.username_loc, 'admin')

    password_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[2]/div/input')

    def password(self):
        self.sendkeys(self.password_loc, 'admin')

    login_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/button[2]')

    def login(self):
        self.click(self.login_loc)

    sure_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')

    def sureloc(self):
        self.click(self.sure_loc)

    add_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div/div[2]/div/div/button[2]/span')
    def add(self):
        self.click(self.add_loc)
    fenlei_loc =(By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[1]/div/div/div/input')
    def fenlei(self):
        self.sendkeys(self.fenlei_loc,'武侠')
    submit_loc= (By.XPATH,'/html/body/div[1]/div/section/section/main/form/div[4]/div/button[1]/span')
    def submit(self):
        self.click(self.submit_loc)